﻿using OznerOA.BLL;
using System;
using System.Collections.Generic;
using System.Windows.Forms;

namespace OznerOA.UI
{
    static class Program
    {
        private static LogBLL logBLL = new LogBLL("Program", string.Empty);
        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        [STAThread]
        static void Main()
        {
            logBLL.Debug("程序启动...");
            Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
            AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;


            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            //DevExpress汉化
            System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("zh-CN");
            Application.Run(new FrmMain());
        }

        private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
        {
            logBLL.Error("异常:" + e.ExceptionObject.ToString());
        }
    }
}
